Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft+3459+3463+hermes #3470

Closed
wants to merge 203 commits into from
Closed

Draft+3459+3463+hermes #3470

wants to merge 203 commits into from

Conversation

brentstone
Copy link
Collaborator

Describe your changes

Indicate on which release or other PRs this topic is based on

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

murisi and others added 25 commits June 27, 2024 19:07
* bat/feat/list-and-offer-snapshots:
  rebasing
  tinies
  Added changelog
* fraccaman/limit-pgf-stewards:
  changelog: add #3442
  cleanup
  bug fix: get correct storage key
  fix genesis files
  improve logs
  added maximum amount of stewards as genesis parameter
  ci: update antithesis workflow
  ci: update antithesis workflow
* grarco/sdk-query-height:
  Changelog #2891
  Fallible trait bound for block height param in queries
* brent/parameterize-gas-scale:
  Updated example of expected string
  Fixes ibc e2e test
  fix unit test
  change comment on Gas Display
  fixes from comments
  changelog: add #3391
  fix and clean up
  Light error handling
  remove hard-coded gas scale
  add gas scale to protocol params
* tomas/move-verify-shielded:
  changelog: add #3419
  shielded_token: feature guard validation to avoid compilation into wasm
  move masp validation from SDK into shielded_token crate
* grarco/masp-fee-payment:
  Removes fallback logic when failed fee payment
  Renames misleading gas limit variable
  Removes useless write-log commit in fee payment
  Fixes typo
  Fixes masp amounts conversion
  Fixes broken docs
  Reuses token transfer
  Fixes typo
  Panics in fee payment if balance read fails
  Changelog #3393
  Adds missing gas spending key arg to ibc tx
  Masp fee payment for shielded actions
  Fixes masp tx generation and integration tests
  Updates shielded wasm code to handle fee unshielding
  Removes unused denominate function
  Adds support for masp fee payment in sdk
  Refactors the write log api
  Different gas cost for storage deletes
  Removes write log precommit and leverages the batch log
  Adds integration tests for masp fee payment
  Refactors batch execution in case of masp fee payment
  Skips the execution of the first inner tx when masp fee payment
  Renames fee payment gas limit parameter
  Returns `BatchedTxResult` from masp fee payment
  `check_fees` drop the storage changes in case of failure
  `check_fees` checks masp fee payment
  Reworks masp fee payment to correctly handle errors. Misc refactors
  Passes the correct tx index to masp fee payment check
  Introduces masp fee payment
* grarco/early-sapling-balance-check:
  Extracts the sapling value balance directly in `validate_transparent_bundle`
  Changelog #2721
  Early sapling balance check in masp vp
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 34.39708% with 2693 lines in your changes missing coverage. Please review.

Project coverage is 53.51%. Comparing base (879a326) to head (140ab53).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/sdk/src/masp.rs 0.48% 616 Missing ⚠️
crates/sdk/src/tx.rs 0.00% 394 Missing ⚠️
crates/namada/src/ledger/native_vp/masp.rs 0.00% 307 Missing ⚠️
crates/apps_lib/src/cli.rs 0.00% 169 Missing ⚠️
crates/shielded_token/src/validation.rs 0.00% 158 Missing ⚠️
crates/node/src/bench_utils.rs 0.00% 86 Missing ⚠️
crates/token/src/lib.rs 0.00% 83 Missing ⚠️
crates/namada/src/ledger/protocol/mod.rs 77.58% 78 Missing ⚠️
crates/core/src/masp.rs 2.77% 70 Missing ⚠️
crates/sdk/src/rpc.rs 0.00% 57 Missing ⚠️
... and 42 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3470      +/-   ##
==========================================
- Coverage   53.92%   53.51%   -0.42%     
==========================================
  Files         317      319       +2     
  Lines      107575   109669    +2094     
==========================================
+ Hits        58011    58687     +676     
- Misses      49564    50982    +1418     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

brentstone and others added 2 commits July 1, 2024 17:16
* yuji/ibc-e2e-config:
  longer interval
  add changelog
  clear on start
  change IBC e2e test config
Comment on lines 18 to 38
// Prepare the sources of the multi-transfer
let sources = transfers
.sources
.into_iter()
.map(|(account, amount)| {
((account.owner, account.token), amount.amount())
})
.collect::<BTreeMap<_, _>>();

// Prepare the target of the multi-transfer
let targets = transfers
.targets
.into_iter()
.map(|(account, amount)| {
((account.owner, account.token), amount.amount())
})
.collect::<BTreeMap<_, _>>();

// Effect the multi transfer
token::multi_transfer(ctx, &sources, &targets)
.wrap_err("Token transfer failed")?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change wasn't included in #3459 or #3463. unexpected change?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I made this change when I was trying to merge #3459 and #3463 with the MASP fee payment changes (that were also touching IBC code). This code is basically an extension of what's already in draft.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I see. The transfer has been added for the fee payment in #3393. However, masp_fee_payment was discarded.

    if let Some(UnshieldingTransferData {
        token,
        amount,
        target,
    }) = &masp_fee_payment
    {
        // Transparent unshield for fee payment
        token::transfer(
            ctx,
            &Address::Internal(address::InternalAddress::Masp),
            target,
            token,
            amount.amount(),
        )?;
    }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, exactly. @grarco Let me know if you have any objections to this merge resolution. Essentially it removes the redundant Transfer (that isn't executed by tx_ibc) from MsgTransfer (and similar IBC messages).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general it looks ok to me, since the new Transfer object is vectorized we can embed the fee payment directly inside it. But the run_ledger_ibc_with_hermes test is failing and it contains a masp fee payment over ibc so it's better if we check it

@brentstone brentstone closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants